package drds.binlog.common.position;


import java.io.Serializable;

/**
 * 描述一个position范围
 */
public class PositionRange<Position extends drds.binlog.common.position.Position> implements Serializable
{

    private static final long serialVersionUID = 1l;
    //
    private Position startPosition;
    //用于记录一个可被ack的位置，保证每次提交到cursor中的位置是一个完整事务的结束
    private Position ackPosition;
    private Position endPosition;

    public PositionRange()
    {
    }

    public PositionRange(Position startPosition, Position endPosition)
    {
        this.startPosition = startPosition;
        this.endPosition = endPosition;
    }

    public Position getStartPosition()
    {
        return startPosition;
    }

    public void setStartPosition(Position startPosition)
    {
        this.startPosition = startPosition;
    }

    public Position getEndPosition()
    {
        return endPosition;
    }

    public void setEndPosition(Position endPosition)
    {
        this.endPosition = endPosition;
    }

    public Position getAckPosition()
    {
        return ackPosition;
    }

    public void setAckPosition(Position ackPosition)
    {
        this.ackPosition = ackPosition;
    }


}
